package basis;

public class ConcreteHandlerB implements Handler {
    private Handler nextHandler;
    @Override
    public void handleRequest(int request) {
        if (request>=10&&request<20){
            System.out.println("basis.ConcreteHandlerB 处理请求：" + request);
        } else if (nextHandler != null) {
            nextHandler.handleRequest(request);
        }
    }

    @Override
    public void setNextHandler(Handler handler) {
        this.nextHandler=handler;
    }
}
